package org.jeecg.modules.wms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.wms.entity.FinishedGoodsOutboundDetail;

import java.util.List;

/**
 * 成品出库单明细Mapper接口
 */
public interface FinishedGoodsOutboundDetailMapper extends BaseMapper<FinishedGoodsOutboundDetail> {

    /**
     * 根据出库单ID查询明细列表
     */
    List<FinishedGoodsOutboundDetail> selectByOutboundId(@Param("outboundId") String outboundId);


    /**
     * 根据订单ID查询出库明细
     */
    List<FinishedGoodsOutboundDetail> selectByOrderId(@Param("orderId") String orderId);

    /**
     * 根据库存ID查询出库明细
     */
    List<FinishedGoodsOutboundDetail> selectByInventoryId(@Param("inventoryId") String inventoryId);

    /**
     * 统计出库总数量
     */
    Integer sumOutboundQuantityByOutboundId(@Param("outboundId") String outboundId);

    /**
     * 批量删除出库明细
     */
    int deleteBatchByOutboundId(@Param("outboundId") String outboundId);
}
